<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>了解更多~</title>
    <style>
        div img{
            width:200px;
            height:200px;
            float:left;
            border-radius:20px;//左上，右上，右下，坐下都是10px
        }
        .lion{
            width:30%;
            position:absolute;
            left:40%;
            top:66%;
        }
    </style>
</head>
<body style="background-color: #ebe5e7">
        <div id="world"></div>
        <div class="lion">
            <img src="images/publicNum.jpg">
            <img src="images/myWechat.jpg">
        </div>
        <div id="music"></div>
</body>
<script src="js/jquery-1.11.1.min.js"></script>
<script src='js/lion.js'></script>
<script src='js/lion2.js'></script>
<script src="js/lion3.js"></script>
<script>
    $(function(){
        console.log("加油");
        var mainLoading = false;
        getContent();

        function getData(result) {
            if(result.status==200){
                return result.data;
            }else{
                alert(result.messages||"获取信息错误");
                return null;
            }
        }

        function getContent(result){
            if (mainLoading) return;

            $.get("music.json",function (result, err) {
                var items = getData(result);
                appendContent(items);
            })

            mainLoading = true;
        }

/*把获取到的列表信息填充入#List中*/
        function appendContent(items){
            console.log("appendContent-music");
            var contentMain;
            var listContentMain=[];
                listContentMain.push('<!--音乐播放器-->');
                listContentMain.push('<div class="music_player" style="display:none;">');
                listContentMain.push('    <bgsound src="radio/'+ items.music +'.mp3" loop="-1" />');
                listContentMain.push('    <audio autoplay="true" controls="controls" height="100" width="100">');
                listContentMain.push('      <source src="radio/'+ items.music +'.mp3" type="audio/mp3" />');
                listContentMain.push('      <embed height="100" width="100" src="'+ items.music +'.mp3"/>');
                listContentMain.push('    </audio>');
                listContentMain.push('</div>');
            contentMain = listContentMain.join("");                 //  连成一句话
            $("#music").append(contentMain);
            mainLoading = false;     //加载完毕
        }
    });
</script>
</html>
